<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=windows-1250" />
  <!-- tinyMCE -->
    <script language="javascript" type="text/javascript" src="../js/tiny_mce/tiny_mce.js"></script>
    <script language="javascript" type="text/javascript">
        tinyMCE.init({
            theme : "advanced",
            mode : "exact",
            elements : "elm1,elm2",
            save_callback : "customSave",
            content_css : "example_advanced.css",
            extended_valid_elements : "a[href|target|name]",
            plugins : "table",
            //theme_advanced_buttons3_add_before : "tablecontrols,separator",
            //invalid_elements : "a",
            theme_advanced_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1", // Theme specific setting CSS classes
            //execcommand_callback : "myCustomExecCommandHandler",
            theme_advanced_toolbar_align : "left",
            theme_advanced_buttons3 : "",
            theme_advanced_toolbar_location : "top",
            apply_source_formatting : true,
            gecko_spellcheck : true,
            debug : false,
            height : "100%"
            
           
           
        });
   
        // Custom event handler
        function myCustomExecCommandHandler(editor_id, elm, command, user_interface, value) {
            var linkElm, imageElm, inst;
   
            switch (command) {
                case "mceLink":
                    inst = tinyMCE.getInstanceById(editor_id);
                    linkElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "a");
   
                    if (linkElm)
                        alert("Link dialog has been overriden. Found link href: " + tinyMCE.getAttrib(linkElm, "href"));
                    else
                        alert("Link dialog has been overriden.");
   
                    return true;
   
                case "mceImage":
                    inst = tinyMCE.getInstanceById(editor_id);
                    imageElm = tinyMCE.getParentElement(inst.selection.getFocusElement(), "img");
   
                    if (imageElm)
                        alert("Image dialog has been overriden. Found image src: " + tinyMCE.getAttrib(imageElm, "src"));
                    else
                        alert("Image dialog has been overriden.");
   
                    return true;
            }
   
            return false; // Pass to next handler in chain
        }
   
        // Custom save callback, gets called when the contents is to be submitted
        function customSave(id, content) {
            alert(id + "=" + content);
        }
    </script>
    <!-- /tinyMCE -->
  <title>Angry</title>
  <style>
    body,html {
        padding: 0;
        margin: 0;
        height:100%
    }
    #editor {
        width: 100%;
        height: 800px;
        background-color: #c00;
    }
  </style>
  </head>
  <body>
  <div id="editor">
  	<form>
  	<textarea name="elm1" id="elm1" style="display:block; height: 1000px; width:100%">SThis is the default content. sweet.</textarea>
  	</form>
  </div>
</body>
</html>
